1. Field of the Invention
This invention relates to a motor driving device for driving and controlling a brushless motor, such as a stepping motor or the like, used as a driving source for an OA (office automation) apparatus or the like.
2. Description of the Prior Art
In a brushless motor, generally, for example Hall elements have been used for detecting positions of magnetic poles of a rotor to perform electric control, and an optical or magnetic encoder has been used for detecting the speed of the rotor.
However, such conventional brushless motor has the following disadvanges:
(1) It is required that magnetic poles of a stator are correctly positioned with respect to the Hall elements; and
(2) Since the positions of the Hall elements and the stator are determined unconditionally when the current switching is effected by the Hall elements, a method for supplying current to the motor is limited to only one way. For example, since in case of a so-called 180.degree. electric control, the positions of the Hall elements regarding the magnetic poles of the stator differ by 45.degree. electrically from those in the case of a so-called 90.degree. electric control, if two kinds of electric controls are effected by a single motor, the number of the Hall elements will be increased twice and all of the Hall elements must be arranged in positions suitable for performing the respective electric controls.
Incidentally, Japanese Patent Laid-Open Nos. 62-193548 (1987) and 62-193549 (1987) disclosed a stepping motor wherein an electric control is effected by utilizing an encoder output. However, these Patent Applications merely disclose the structure of the stepping motor itself including the encoder in a predetermined position, but do not disclose or teach the control circuit or method for driving the stepping motor.
Now, the assignee of the present application has proposed, in U.S. Ser. No. 259,259 filed on Oct. 18, 1988, a control apparatus for a stepping motor wherein an encoder having portions to be detected the number of which is an integer multiple of that of the magnetic poles of the rotor is fixedly mounted on a shaft of the rotor. When the rotor is rotated, the number of the portions to be detected on the encoder passing through a predetermined position situated at the stator side is counted so that when the counted number coincides with a predetermined value the current supply to the coils of the stator is switched. Conventionally, the drive control for the stepping motor has been performed by merely performing an open-loop control of the number of driving pulses of the stepping motor and the frequency of the pulses.
However, if the stepping motor is used as the carriage driving motor and the stepping motor is driven by the open-loop control, during the movement of the carriage, discordant noise is generated due to the vibration of the rotor of the stepping motor, particularly, the hybrid stepping motor. Further, upon start, stop and reverse of the carriage, and accordingly, upon start, stop and reverse of the stepping motor, since the stepping motor is started or stopped with vibration, large noise is also generated. These noises must be avoided, particularly in an ink jet printer such as a bubble jet printer which generates no substantial noise.
Now, the assignee of the present application has proposed, in U.S. Ser. No. 302,196 filed on Jan. 27, 1989, a recording apparatus, using the stepping motor as a driving source for shifting a recording head to scan for a recording operation, which comprises detection means for detecting the position of the rotation angle of the rotor of the stepping motor, and control means for performing a closed-loop control of the drive of the stepping motor in accordance with the result of detection by the detection means.
However, in order to perform a closed-loop control of the stepping motor, it is necessary to provide an encoder for detecting the position of the rotation angle of the rotor and it is also necessary to register the positions of the magnetic poles of the rotor with the positions of the magnetic poles (slits in the magnetic or optical system) of the encoder during assembling of the stepping motor. The reason why such registration of positions between the magnetic poles of the rotor and those of the encoder is required is that the the phase switching of the stepping motor must be synchronous with the output pulses of the encoder. If such positional registration is not obtained with high accuracy, the motor will not be rotated or will have different rotational speeds in opposite directions.
On the other hand, if the number of pulses generated during one revolution of the encoder is increased to improve the resolving power for each pulse, such positional registration will not be required. For example, in a PM stepping motor in which one revolution is achieved by 48 steps, the number of the magnetic poles of the rotor is 24 (twenty-four). In this case, if the number of the output pulses of the encoder is 288 for each revolution, the output having 12 (twelve) pulses can be obtained for each magnetic pole of the rotor. If the encoder is fixedly mounted on the shaft of the rotor at random, since the deviation between the center of the magnetic poles of the rotor and the center of the magnetic poles of the encoder corresponds to a half of a distance of two adjacent pulses at the most, such deviation will be included in the range of .+-.4.2%. In this case, the deviation in the switching timing of the exciting current can be negligible.
However, in this case, it must be determined which magnetic pole of the encoder corresponds to the particular magnetic pole of the rotor. To this end, first of all, the current is supplied to the coils of the motor for a predetermined time or more. Then, when the rotor of the motor is slightly rotated by the energization of the coils due to such current supply and then is stopped, the magnetic pole in the encoder which is registered with the magnetic pole of the rotor is selected. The other magnetic poles in the encoder may be selected at intervals of twelve pulses on the basis of the firstly selected magnetic pole.
The initialization of the encoder as mentioned above must be effected prior to the action of the stepping motor. That is to say, when such stepping motor is used as the carriage driving motor for a serial printer, it is necessary to initialize the encoder before the printer is powered on.
In order to perform such initialization, the assignee of the present application has previously proposed, in U.S. Ser. No. 413,473 filed on Sep. 27, 1989, in a recording apparatus using a stepping motor as a driving source for shifting a recording head to scan for a recording operation, a control device for the stepping motor which comprises detection means for detecting the position of the rotation angle of the rotor of the stepping motor, and control means for performing a closed-loop control of the drive of the stepping motor in accordance with the result of detection by the detection means and for driving the stepping motor and holding the rotor by controlling the current according to pulse-width modulation at the initialization processing wherein the drive of the stepping motor by the closed-loop control is started.
This device has the configuration as shown in FIG. 11. The device illustrates a case wherein a motor 1 is a driving source for a moving carriage 2 having a recording head in a printer or the like.
As the driving source for the carriage 2, a brushless motor, such as a stepping motor or the like, is generally used.
In FIG. 11, the driving device for the brushless motor comprises an encoder 4 for detecting the amount of rotation of the motor 1, a current switching circuit 8 for outputting a switching signal 16 for the excitation of the coil of the motor 1 after processing a signal 13 from the encoder 4, a motor driving circuit 10, a control circuit (MPU) for controlling the start, stop and speed of the motor 1, a PWM (pulse-width modulation) signal generator 9 for outputting a PWM signal 17 according to a speed control signal 14 from the control circuit 7, and the like.
In FIG. 11, reference number 5 represents a control unit for controlling the start, stop and speed of the motor 1, and reference numbers 11 and 12 represent a ROM and a RAM within the control unit 5, respectively.
FIGS. 13(A) and 13(B) are a partially-broken-away perspective view and a vertical cross-sectional view of a stepping motor as a kind of a brushless motor to which the present invention can be suitably applied.
In FIGS. 13(A) and 13(B), the brushless motor 1 has two exciting phases, i.e., "phase A" 2 and "phase B" 3. The motor 1 comprises a rotor shaft 43, a rotor 44 fixed to the rotor shaft 43, a magnet rotor 42 made of a permanent magnet provided at an outer circumference of the rotor 44, a coil 45A and a stator 46A for phase A, and a coil 45B and a stator 46B for phase B.
A rotary encoder 49 is also provided which comprises a slit disk 47 mounted on the lower end of the rotor shaft 43, and a photo-interrupter 48 fixed to the motor case receiving the slit disk 47.
The rotary encoder 49, which corresponds to the encoder 4 in FIG. 11, outputs slit detection signals (rotation-amount signals) in accordance with the rotation of the rotor.
When the exciting current for the coils 45A and 45B is switched with a predetermined timing to change the generated magnetic fields, the magnetic flux crossing the permanent magnet 42 changes to rotatably drive the rotor 44.
By counting the pulse signals (slit detection signals) 13 from the encoder 4 by the current switching circuit 8 and exciting predetermined coils 45A and 45B for every predetermined number of pulses, the rotation of the motor can be continued.
When the brushless motor 1 is mounted on an OA apparatus or the like as a power source, the control circuit 7 controls the start, stop and rotational speed of the motor 1.
The control of the rotational speed is performed, for example, by calculating the speed of the motor 1 from an interval between slit signals from the encoder 4, and changing the duty ratio (the ratio of the time during which the motor driving circuit is turned on to the total time) of the PWM signal for speed control according to an error between the calculated speed and a reference speed.
For example, if the rotational speed of the motor 1 is larger than the assinged speed, the duty ratio of the PWM signal is reduced, thus decreasing the amount of the exciting current for the motor 1 to reduce the rotational speed.
If the rotational speed of the motor 1 is smaller than the assigned speed, the duty ratio of the PWM signal is increased to increase the rotational speed of the motor 1.
However, at the driving speed of the above-described conventional brushless motor, although the rotation and the rotational speed of the motor can be controlled, there is the technical problem that control for suppressing a torque ripple caused by the brushless motor itself cannot be performed.
The torque ripple is a pulsation in the torque generated by the brushless motor, causing noise and vibration in an OA apparatus or the like.
The generation of the torque ripple will now be explained by reference to the motor 1 shown in FIGS. 13(A) and 13(B).
As described above, the brushless motor rotates according to an interaction between the magnetic field generated by the excitation of the coils and the magnetic poles on the rotor.
In the brushless motor shown in FIGS. 13(A) and 13(B), a rotational force (torque) is generated by an interaction between the magnetic teeth of the stators 46A and 46B magnetized by the magnetic fields of the coils and the rotor magnet 42 having the same number of magnetic poles as that of the magnetic teeth.
Since the usual brushless motor has a multi-layered structure having a plurality of coils, the motor is rotated with a plurality of exciting phases superposed with one another.
FIGS. 12(A)-12(C) are graphs showing the rotational forces of the brushless motor shown in FIGS. 13(A) and 13(B).
For example, the rotational force due to an interaction between the magnetic poles of the brushless motor having the two exciting phases as shown in FIGS. 13(A) and 13(B) has shape wherein mountains are superposed with one another, as shown in the graph of the exciting torque in FIG. 12(A). This is because the rotational force is generated while alternately switching the two coils 45A and 45B.
In addition to the above-described exciting torque, however, the brushless motor has a pulsation in the torque named a detent torque, as shown in FIG. 12(B).
The detent torque, which represents variations in load produced when the motor 1 is rotated around the rotor shaft 43 in an open state (in a non-excitation state), is generated due to an interaction between the magnetic poles of the rotor and the magnetic teeth of the stator.
While the interaction between the magnetic fields generated by exciting the coils 45A and 45B consists of attraction and repulsion, the detent torque consists only of attraction.
Consequently, the pulsation in the torque generated in the brushless motor is a result of adding (superposing) the two interactions shown in FIGS. 12(A) and 12(B), and has the shape including a distortion as shown in FIG. 12(C).
Microscopically, the rotational speed of the motor also repeats variations in the speed similar to the above-described distortion.
Since the frequency of the variations in the rotational speed is too high at the usual rotational speed of the motor, it is impossible to remove the variations merely by the control by the control circuit.